package com.hotel.entity;

public class Bookid {
    private String cid;     // 房型编号
    private String no;      // 房间号
    private String status;  // 房间状态

    // 添加转换后的字段
    private String bookidTypeName;  // 房型名称
    private String statusName;    // 状态名称

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
        // 设置房型名称
        switch (cid) {
            case "1":
                this.bookidTypeName = "活着";
                break;
            case "2":
                this.bookidTypeName = "百年孤独";
                break;
            case "3":
                this.bookidTypeName = "挪威的森林";
                break;
            case "4":
                this.bookidTypeName = "平凡的世界";
                break;
            case "5":
                this.bookidTypeName = "小王子";
                break;
            case "6":
                this.bookidTypeName = "悲惨世界";
                break;
            case "7":
                this.bookidTypeName = "追风筝的人";
                break;
            case "8":
                this.bookidTypeName = "围城";
                break;
            case "9":
                this.bookidTypeName = "海边的卡夫卡";
                break;
            case "10":
                this.bookidTypeName = "论语";
                break;
            default:
                this.bookidTypeName = "未知";
        }
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
        // 设置状态名称
        if ("c".equalsIgnoreCase(status)) {
            this.statusName = "已借出";
        } else if ("o".equalsIgnoreCase(status)) {
            this.statusName = "未借出";
        } else {
            this.statusName = "未知状态";
        }
    }

    public String getBookidTypeName() {
        return bookidTypeName;
    }

    public String getStatusName() {
        return statusName;
    }
}